package com;

import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;

import java.sql.SQLException;

public class Demo02Druid {
    public static void main(String[] args) throws SQLException {
        DruidDataSource dataSource = new DruidDataSource();
        dataSource.setDriverClassName("com.mysql.jdbc.Driver");
        dataSource.setUrl("jdbc:mysql://125.74.233.192:3306/fruitdb??characterEncoding=utf-8&rewriteBatchedStatements=true&useSSL=false");
        dataSource.setUsername("root");
        dataSource.setPassword("123456123");
        DruidPooledConnection connection = dataSource.getConnection();
        System.out.println("connection = " +connection );


    }
}
